/*
 * @Author: sunzhijun 
 * @Date: 2020-02-28 21:36:16 
 * @Last Modified by: sunzhijun
 * @Last Modified time: 2020-02-28 21:37:43
 */


import React from 'react';
import {render, connect} from 'src/hrpub/common/frame';
import Pagination from '../Pagination';
import './index.less';

const CardForm = render({
    
})(({props, state}) => {
    const {main, editTable, action, search} = props;
    const { createEditTable } = editTable;
    const { NCCreateSearch } = search;
    let { tableId, H } = main; 
    return (
        <React.Fragment>
            <div className="table-area">
                {createEditTable(tableId,{
                    cancelCustomRightMenu: true,
                    showIndex: true,
                    showCheck: true,
                    // adaptionHeight: true,
                    height: H,
                    onRowDoubleClick: action.tableAct.toCardForm
                })}
            </div>
            <div style={{display: "none"}}>
                {
                    NCCreateSearch('listquery', {
                        clickSearchBtn: action.headerAct.searchData,
                        onlyShowAdvArea: false,
                        showAdvSearchPlanBtn: true,
                        onlyShowSuperBtn: true
                    })
                }
            </div>
            <Pagination 
                {...props}
            ></Pagination>
        </React.Fragment>
    );
});
export default CardForm;